using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace Oops.Xna.Framework.Input
{
	[Flags()]
	public enum MouseButtons
	{
		None,
		Left = 1,
		Right = 2,
		Middle = 4
	}

	public interface IInputService
	{
		bool IsKeyUp(Keys key);
		bool IsKeyDown(Keys key);
		bool IsKeyPressed(Keys key);
		bool IsKeyReleased(Keys key);
#if !XBOX
		bool KeepMouseCaptured { get; set; }
		int MouseX { get; }
		int MouseY { get; }
		int MouseXDelta { get; }
		int MouseYDelta { get; }
		int MouseWheel { get; }
		int MouseWheelDelta { get; }

		void SetMousePosition(int x, int y);

		bool IsMouseButtonUp(MouseButtons button);
		bool IsMouseButtonDown(MouseButtons button);
		bool IsMouseButtonPressed(MouseButtons button);
		bool IsMouseButtonReleased(MouseButtons button);

		MouseButtons GetMouseButtonsUp();
		MouseButtons GetMouseButtonsDown();
		MouseButtons GetMouseButtonsPressed();
		MouseButtons GetMouseButtonsReleased();
#endif
		GamePadDeadZone ThumbStickDeadZone { get; set; }
		float ThumbStickEase { get; set; }
		float TriggerEase { get; set; }
		
		bool IsGamePadConnecting(int index);
		bool IsGamePadDisconnecting(int index);
		bool IsGamePadConnected(int index);

		bool IsGamePadButtonUp(int index, Buttons buttons);
		bool IsGamePadButtonDown(int index, Buttons buttons);
		bool IsGamePadButtonPressed(int index, Buttons button);
		bool IsGamePadButtonReleased(int index, Buttons button);

		Vector2 GetGamePadLeftThumbStick(int index);
		Vector2 GetGamePadLeftThumbStickPrevious(int index);
		Vector2 GetGamePadLeftThumbStickDelta(int index);

		Vector2 GetGamePadRightThumbStick(int index);
		Vector2 GetGamePadRightThumbStickPrevious(int index);
		Vector2 GetGamePadRightThumbStickDelta(int index);
		
		float GetGamePadLeftTrigger(int index);
		float GetGamePadLeftTriggerDelta(int index);
		float GetGamePadRightTrigger(int index);
		float GetGamePadRightTriggerDelta(int index);
    }
}
